﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;


namespace CubicFWNet.Data.CMS.Model
{
    [Table("Article")]
    public class Article
    {
        [Key]
        public Guid Id { get; set; }
        [DisplayName("标题")]
        [Required]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar")]
        public string Title { get; set; }

        [DisplayName("内容")]
        [Column(TypeName = "nvarchar")]
        public string Content { get; set; }

        [DisplayName("栏目Id")]
        [Column(TypeName = "nvarchar")]
        [MaxLength(2000)]
        public string ChannelIds { get; set; }

        [DisplayName("栏目名称")]
        [MaxLength(1024)]
        [Column(TypeName = "nvarchar")]
        public string ChannelNames { get; set; }

        [DisplayName("封面图片")]
        [MaxLength(300)]
        [Column(TypeName = "nvarchar")]
        public string CoverPicture { get; set; }

        [DisplayName("热度")]
        [DefaultValue(0)]
        public int Hits { get; set; }

        [DisplayName("是否激活")]
        public bool IsActive { get; set; }

        [NotMapped]
        public string TagString { get; set; }

        [DisplayName("创建时间")]
        public System.DateTime CreateTime { get; set; }

        [DisplayName("创建人")]
        public System.Guid CreatorId { get; set; }

    }
}
